/**
 * Scale. 
 * by Alvaro Lopez and Juan Baquero
 * 
 *Put your VYM files inside the Scketch folder.
 *Press the arrow keys or click the nodes for surfing the map.
 *
 *Use the SCALE function pressing the 'U' button into the sketch, or setting the control parameter.
 *You can choose the SCALE between the CENTERED, SCALED and REAL mode.
 *All modes scales the map's nodes, lines, and words.
 *
 *Check the SCALE section for more info.
 */

import remixlab.remixvym.*;

void setup() {
  size(800,600,P2D);
  map = new MindMap();
  PXMLReader xml = new PXMLReader(this);
  //Load the XML file created from VYM.
  map.create("Example-scale.xml", xml);
  graph = new SceneMindMap(this); 

  //SCALE.
  //Parameters and description:
  //(1)SCALED: If the sketch area is bigger than the map, it sets the map for fill the 
  //major amount of area into the sketch.
  //(2)REAL: If the sketch area is bigger than the map, it conserves the original size.
  //(3)CENTERED: Sets the map in the sketch center.              
  graph.setScaleMode(1);                
  graph.setMap(map);
}

void draw() {
  graph.paint();
}

SceneMindMap graph;
MindMap map;

